Oil Spill Spatial Analysis

Spatial analysis of oil spills in California.

Anastasia Kunz
02-21-2021

Oil Spills Spatial Exploration

Explore occurrence data for California oil spills in 2008 through the interactive map below.

hide
# Read in the data:
oilspill <- read_sf(here("oil_spill_data"),
                    layer = "Oil_Spill_Incident_Tracking_%5Bds394%5D") %>% 
  clean_names() %>% 
  mutate(date = as.Date(dateofinci)) %>% 
  mutate(date = ymd(date)) %>% 
  rename(name = localecoun) %>% 
  select(name, date, inlandmari)

counties <- read_sf(here("ca_counties"),
                    layer = "CA_Counties_TIGER2016") %>% 
  clean_names() %>% 
  select(name)
hide
tmap_mode("view")

tm_shape(counties)+
  tm_polygons(alpha = 0.4)+
  tm_shape(oilspill)+
  tm_dots(col = "red", scale = .8, alpha = 0.6)+
  tm_basemap("Esri.WorldTopoMap")
hide
oil_counties <- counties %>% 
  st_join(oilspill) %>% 
  count(name.x, inlandmari) %>% 
  filter(inlandmari == "Inland")

County Oil Spills Choropleth Map

Some California counties have much higher concentrations of inland oil spills than others. The choropleth map below shows the number of inland oil spills for each California county.

hide
ggplot()+
  
  geom_sf(data = counties)+
  geom_sf(data = oil_counties, aes(fill = n))+
  scale_fill_viridis("Number of Oilspills", option = "plasma")+
  theme_void()+
  labs(
    title = "Inland Oilspills in California by County"
  )

Data Citation

California Department of Fish and Game, Office of Spill Prevention and Response. Oil Spill Incident Tracking [ds394] (2008).